package com.mmall.concurrency.example.threadLocal;

/**
 * <p>Descriptions...
 *
 * @author Diamon.Cheng
 * @date 2019/12/6.
 */
public class RequestHolders {
    
    private  final  static  ThreadLocal<Long>  local = new ThreadLocal<>();
    
    public  static void add(Long  id){
        local.set(id);
    }
    
    public  static  Long getId(){
        return  local.get();
    }
    
    
    public  static void  remove(){
        local.remove();
    }
}
